/// <reference path="../Scripts/jquery-1.7.1.min.js" />
/// <reference path="../Scripts/knockout-2.1.0.js" />

function LocalPasswordViewModel() {
	var self = this;
	self.OldPassword = ko.observable();
	self.NewPassword = ko.observable();
	self.ConfirmPassword = ko.observable();

	self.ChangePassword = function () {

		alert("We are in the ChangePassword ko function");

		var myData = ko.toJSON(this);
		jQuery.ajax({
			url: "./account/manage/",
			type: 'post',
			data: myData,
			contentType: 'application/json',
			success: function (result) {
				location.href = "/";
			},
			error: function (xhr, ajaxOptions, thrownError) {
				alert('Status: ' + xhr.status + ' Response Text: ' + xhr.responseText);
			}

		});
	}; //End of add procedure
}; //End of view model







